<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title><?php echo lang('system_manager')?></title>
        <link rel="stylesheet" type="text/css" href="<?php echo base_url()?>templates/css/administrator.css">
        <link rel="stylesheet" type="text/css" href="<?php echo base_url()?>templates/css/styles.css">
        <link rel="stylesheet" type="text/css" href="<?php echo base_url()?>templates/css/icon.css">
        <link rel="stylesheet" type="text/css" href="<?php echo base_url()?>templates/css/menu.css">
        <link rel="stylesheet" type="text/css" href="<?php echo base_url()?>templates/css/system.css">
        <link rel="stylesheet" type="text/css" href="<?php echo base_url()?>templates/css/ui/colorbox.css">
        <link rel="stylesheet" type="text/css" href="<?php echo base_url()?>templates/css/datepicker.css">
        <link rel="stylesheet" type="text/css" href="<?php echo base_url()?>templates/css/datetheme.css">
        <link rel="stylesheet" type="text/css" href="<?php echo base_url()?>templates/css/validation.css">
        <script type="text/javascript" src="<?php echo base_url()?>templates/js/jquery-core.js"></script>
        <script type="text/javascript" src="<?php echo base_url()?>templates/js/jquery.ui.core.js"></script>
        <script type="text/javascript" src="<?php echo base_url()?>templates/js/function.admin.js"></script>
        <script type="text/javascript" src="<?php echo base_url()?>templates/js/datepicker.js"></script>
        <script type="text/javascript" src="<?php echo base_url()?>templates/js/widget.js"></script>
        <script type="text/javascript" src="<?php echo base_url()?>templates/js/apps.js"></script>
        <script type="text/javascript" src="<?php echo base_url()?>templates/js/ui.js"></script>
        <script type="text/javascript" src="<?php echo base_url()?>templates/js/ajaxupload.js"></script>
        <script type="text/javascript" src="<?php echo base_url()?>templates/js/ui/jquery.colorbox.min.js"></script>
        <script type="text/javascript" src="<?php echo base_url()?>templates/js/set_check_box.js"></script>
        <script type="text/javascript" src="<?php echo base_url()?>templates/js/tooltip.js"></script>
        <script type="text/javascript" src="<?php echo base_url()?>templates/js/price_format.js"></script>
        <script type="text/javascript" src="<?php echo base_url()?>templates/js/jquery.validate.min.js"></script>
        <script type="text/javascript" src="<?php echo base_url()?>templates/tinymce/tiny_mce.js"></script>
        <script type="text/javascript" src="<?php echo base_url()?>templates/js/jquery-ui-1.8.23.custom.min.js"></script>
        <script type="text/javascript" src="<?php echo base_url()?>templates/js/yam.formart-numer.js"></script>
        <link rel="stylesheet" type="text/css" href="<?php echo base_url()?>templates/js/JSCal2-1.7/src/css/jscal2.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo base_url()?>templates/js/JSCal2-1.7/src/css/border-radius.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo base_url()?>templates/js/JSCal2-1.7/src/css/steel/steel.css" />
        <script type="text/javascript" src="<?php echo base_url()?>templates/js/JSCal2-1.7/src/js/jscal2.js"></script>
        <script type="text/javascript" src="<?php echo base_url()?>templates/js/JSCal2-1.7/src/js/lang/en.js"></script>
        <script type="text/javascript">
            var url = '<?php echo base_url()?>';
            var urlsite = '<?php echo base_url_site()?>';
            var urlimg = '<?php echo base_url_site().'/uploads/images/'?>';
            var BASE_URI = '<?php echo base_url()?>';
			
        </script>
        <script type="text/javascript">
	tinyMCE.init({
		mode : "textareas",
		theme : "advanced",
		plugins : "style,layer,preview,searchreplace,contextmenu,paste",
        theme_advanced_buttons1 : "mymenubutton,bold,italic,underline,separator,pastetext,pasteword,code,separator,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,forecolor,backcolor,bullist,numlist,undo,redo,link,unlink",
        theme_advanced_buttons2 : "",
        theme_advanced_buttons3 : "",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        editor_selector : "mceSimple"
	});
	tinyMCE.init({
		mode : "textareas",
		theme : "advanced",
		extended_valid_elements :  "iframe[src|width|height|name|align]",
		plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist,imagemanager",
		theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
		theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
		theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
		theme_advanced_buttons4 : "",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		relative_urls : false,
		remove_script_host : false,
        // Skin options
        skin : "o2k7",
        skin_variant : "silver",
		elements : 'abshosturls',
		editor_selector : "mceAdvanced"
		<?php if(!empty($imagemanager_rootpath)) {?>,
		imagemanager_rootpath: '{0}/<?php echo $imagemanager_rootpath; ?>'
		<?php }?>
	});

		
</script>
 
    </head>
<body>
    <div align="center" style="display: none;" id="ajax-load">
        <div class="loading"><?php echo lang('loading_data')?></div>
    </div>
    <?
    if(!$this->session->userdata('admin_id')){
        redirect(base_url());
		
    }
    ?>
    <div id="wrapper">
        <ul id="topbar">
            <li>
                <a href="<?php echo base_url_site()?>" target="_blank" title="Site" class="button white fl"><span class="icon_single preview"></span></a>
            </li>
            <li class="s_1"></li>
            <li class="logo"><?php echo $this->config->item('site_name')?></li>
            <li class="s_1"></li>
            <li class="fr">
                <a href="<?php echo base_url()?>login/logout" title="logout" class="button red fl"><span class="icon_text logout"></span><?php echo lang('exit')?></a>
            </li>
            <li class="s_1 fr"></li>
            <li class="fr">
                <a href="#" title="admin" class="button white fl"><span class="icon_text admin"></span><?php echo $this->session->userdata('admin_fullname')?></a>
            </li>
            <li class="fr"><a id="logged"><?php echo lang('login_as');?> <?php echo $this->session->userdata('login_name')?></a></li>  
               
        </ul>
        <div class="menubar">
            <?php echo $this->load->view('modules/mod_menu')?>
        </div>
        <div id="admincontent">
            <table class="table_full" style="width: 100%;">
                <tr>
                    <td class="colum_left_small" valign="top" style="display: none;"><span onclick="clickHide(2)" class="lage">&nbsp;</span></td>
                    <!--<td class="colum_left_lage" valign="top"><div style="padding-right:20px; padding-left:4px; width:200px">
                            <div class="divclose">
                                <div class="small" onclick="clickHide(1);">&nbsp;</div>
                            </div>
                            <div id="menu-left">
                                <?//=$this->load->view('modules/mod_menuleft')?>
                            </div>
                        </div></td>-->
                    <td bgcolor="#F2F2F2" style="width: 100%;">
                        <table style="width: 100%;">
                            <tr>
                                <td colspan="3"><?php if(!empty($message)) echo "<div style='border:1px solid #fdb735; background-color: #e9ffef; padding:10px;margin-bottom:10px'>".$message."</div>";?>
                                    <?php if($this->session->flashdata('message')){
                                        echo '<div class="message">'.$this->session->flashdata('message').'</div>';
                                    }if($this->session->flashdata('error')){
                                        echo '<div class="error">'.$this->session->flashdata('error').'</div>';
                                    }if($this->session->flashdata('notes')){
                                        echo '<div class="notes">'.$this->session->flashdata('notes').'</div>';
                                    } ?>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 50%;height: 55px;">
                                    <div class="title-admin"><?php echo $title?></div>
                                </td>
                                <td style="width: 25%; vertical-align: bottom;"><?php if(!empty($search_bar)){echo $search_bar;} ?></td>
                                <td style="width: 25%;">
                                    <ul class="click">
                                        <?php if(!empty($trash)){?>
                                        <li> <a title="<?php echo lang('trash')?>" href="<?php echo site_url($trash)?>"><img src="<?php echo base_url()?>templates/images/trash.png" alt="" />
                                            <div><?php echo lang('trash')?></div>
                                            </a> </li>
                                        <?php }?>
                                        <li> <a title="<?php echo lang('back');?>" href="javascript:history.go(-1)"> <img src="<?php echo base_url()?>templates/images/refresh.png" alt=""/>
                                            <div><?php echo lang('back');?></div>
                                            </a> </li>
                                        <?php if(!empty($print)){?>
                                        <li> <a title="<?php echo lang('print');?>" id="printer" class="cboxElement" href="<?php echo base_url().$print?>" onclick="printer()"> <img src="<?php echo base_url()?>templates/images/printer.png" alt=""/><div><?php echo lang('print');?></div></a></li>
                                        <?php }?>
                                        <?php if(!empty($add)){?>
                                        <li> <a title="<?php echo lang('add_new');?>" href="<?php echo site_url($add)?>"><img src="<?php echo base_url()?>templates/images/add.png" alt=""/>
                                            <div><?php echo lang('add_new');?></div></a></li>
                                        <?php }?>
                                        <?php if(!empty($export)){?>
                                        <li> <a title="<?php echo lang('export_excel');?>" href="<?php echo site_url($export)?>"> <img src="<?php echo base_url()?>templates/images/excel.png" alt="<?php echo lang('export_excel');?>" width="25"/>
                                            <div><?php echo lang('export_excel');?></div>
                                            </a> </li>
                                        <?php }?>
                                    </ul>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3">
                                    <div class="box-content"><?php echo $this->load->view($page)?></div>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>

    </div>
    <script type="text/javascript">
        $(document).ready(function(){
            //setTimeout('$(".message").slideUp()', 1000) ;
        }) ;
        function auto_search(url_search)
        {
            var key_search = $("#key_search").val();
            $.ajax({
                type: "POST",
                url: "<?php echo base_url()?>"+url_search,
                data: {key_search:key_search,field_search:$("#field_search").val(),type:"ajax"},
                cache: false,
                dataType: "html",
                success: function(data){
                    $(".box-content").html(data);
                }
            });
        }
    </script>
   
    <div id="footer">
        <div><?php echo lang('time_load_page')?> {elapsed_time} <?php echo lang('second')?></div>
        <div>© Copyright <?php echo $this->config->item('site_name')?>. All right reserved</div>
        <div><?php echo lang('admin_support')?>: <a href="mailto:kque.tran@gmail.com" title="Trần Thị Kim Quế">kque.tran@gmail.com</a></div>
    </div>
</body>
</html>
